package com.eastfair.venuebooking.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.venuebooking.enumeration.ExhibitionExhibitionNatureEnum;
import com.eastfair.venuebooking.enumeration.ExhibitionExhibitionMainTypeEnum;
import com.eastfair.venuebooking.enumeration.ExhibitionExhibitionTypeEnum;
import com.eastfair.venuebooking.enumeration.ExhibitionStateEnum;
import com.eastfair.venuebooking.enumeration.ExhibitionIndustryEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 展会
 * </p>
 *
 * @author linan
 * @since 2023-03-22
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("vb_exhibition")
@ApiModel(value = "Exhibition", description = "展会")
@AllArgsConstructor
public class Exhibition extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 归属人员
     */
    @ApiModelProperty(value = "归属人员")
    @TableField(value = "belong_to")
    @Excel(name = "归属人员")
    private Long belongTo;

    /**
     * 归属人员姓名
     */
    @ApiModelProperty(value = "归属人员姓名")
    @Size(max = 255, message = "归属人员姓名长度不能超过255")
    @TableField(value = "belong_to_name", condition = LIKE)
    @Excel(name = "归属人员姓名")
    private String belongToName;

    /**
     * 归属人员部门id
     */
    @ApiModelProperty(value = "归属人员部门id")
    @TableField(value = "org_code")
    @Excel(name = "归属人员部门id")
    private Long orgCode;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 255, message = "展会名称长度不能超过255")
    @TableField(value = "exhibition_name", condition = LIKE)
    @Excel(name = "展会名称")
    private String exhibitionName;

    /**
     * 外部展会唯一标识
     */
    @ApiModelProperty(value = "外部展会唯一标识")
    @Size(max = 64, message = "外部展会唯一标识长度不能超过64")
    @TableField(value = "external_exhibition_code", condition = LIKE)
    @Excel(name = "外部展会唯一标识")
    private String externalExhibitionCode;

    /**
     * 客户id
     */
    @ApiModelProperty(value = "客户id")
    @TableField(value = "customer_id")
    @Excel(name = "客户id")
    private Long customerId;

    /**
     * 客户名称
     */
    @ApiModelProperty(value = "客户名称")
    @Size(max = 64, message = "客户名称长度不能超过64")
    @TableField(value = "customer_name", condition = LIKE)
    @Excel(name = "客户名称")
    private String customerName;

    /**
     * 客户联系人
     */
    @ApiModelProperty(value = "客户联系人")
    @TableField(value = "cutomer_contacts_id")
    @Excel(name = "客户联系人")
    private Long cutomerContactsId;

    /**
     * 客户联系人名称
     */
    @ApiModelProperty(value = "客户联系人名称")
    @Size(max = 255, message = "客户联系人名称长度不能超过255")
    @TableField(value = "cutomer_contacts_name", condition = LIKE)
    @Excel(name = "客户联系人名称")
    private String cutomerContactsName;

    /**
     * 商机id
     */
    @ApiModelProperty(value = "商机id")
    @TableField(value = "business_opportunity_id")
    @Excel(name = "商机id")
    private Long businessOpportunityId;

    /**
     * 弃用  报价书id(跟展会没有强绑定关系，过渡到合同用的)
     */
    @ApiModelProperty(value = "弃用  报价书id(跟展会没有强绑定关系，过渡到合同用的)")
    @TableField(value = "quotation_id")
    @Excel(name = "弃用  报价书id(跟展会没有强绑定关系，过渡到合同用的)")
    private Long quotationId;

    /**
     * 展览开始时间
     */
    @ApiModelProperty(value = "展览开始时间")
    @TableField(value = "exhibition_start_time")
    @Excel(name = "展览开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime exhibitionStartTime;

    /**
     * 展览结束时间
     */
    @ApiModelProperty(value = "展览结束时间")
    @TableField(value = "exhibition_end_time")
    @Excel(name = "展览结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime exhibitionEndTime;

    /**
     * 布展开始时间
     */
    @ApiModelProperty(value = "布展开始时间")
    @TableField(value = "arrangement_start_time")
    @Excel(name = "布展开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime arrangementStartTime;

    /**
     * 布展结束时间
     */
    @ApiModelProperty(value = "布展结束时间")
    @TableField(value = "arrangement_end_time")
    @Excel(name = "布展结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime arrangementEndTime;

    /**
     * 撤展开始时间
     */
    @ApiModelProperty(value = "撤展开始时间")
    @TableField(value = "dismantling_start_time")
    @Excel(name = "撤展开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime dismantlingStartTime;

    /**
     * 撤展结束时间
     */
    @ApiModelProperty(value = "撤展结束时间")
    @TableField(value = "dismantling_end_time")
    @Excel(name = "撤展结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime dismantlingEndTime;

    /**
     * 展会性质 #{GOVERNMENT:政府展;BUSINESS:商业展;CONSUMPTION:消费展;TRADE:贸易展;OTHER:其他}
     */
    @ApiModelProperty(value = "展会性质 #{GOVERNMENT:政府展;BUSINESS:商业展;CONSUMPTION:消费展;TRADE:贸易展;OTHER:其他}")
    @TableField(value = "exhibition_nature")
    @Excel(name = "展会性质 #{GOVERNMENT:政府展;BUSINESS:商业展;CONSUMPTION:消费展;TRADE:贸易展;OTHER:其他}", replace = {"政府展_GOVERNMENT", "商业展_BUSINESS", "消费展_CONSUMPTION", "贸易展_TRADE", "其他_OTHER",  "_null"})
    private ExhibitionExhibitionNatureEnum exhibitionNature;

    /**
     * 展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}
     */
    @ApiModelProperty(value = "展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}")
    @TableField(value = "exhibition_type")
    @Excel(name = "展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}", replace = {"展会_EXHIBITION", "会议_MEETING", "论坛_FORUM", "其他_OTHER",  "_null"})
    private ExhibitionExhibitionTypeEnum exhibitionType;

    /**
     * 中文简称
     */
    @ApiModelProperty(value = "中文简称")
    @Size(max = 255, message = "中文简称长度不能超过255")
    @TableField(value = "exhibition_short_name", condition = LIKE)
    @Excel(name = "中文简称")
    private String exhibitionShortName;

    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称")
    @Size(max = 255, message = "英文名称长度不能超过255")
    @TableField(value = "exhibition_en_name", condition = LIKE)
    @Excel(name = "英文名称")
    private String exhibitionEnName;

    /**
     * 英文简称
     */
    @ApiModelProperty(value = "英文简称")
    @Size(max = 255, message = "英文简称长度不能超过255")
    @TableField(value = "exhibition_en_short_name", condition = LIKE)
    @Excel(name = "英文简称")
    private String exhibitionEnShortName;

    /**
     * 主办
     */
    @ApiModelProperty(value = "主办")
    @Size(max = 255, message = "主办长度不能超过255")
    @TableField(value = "sponsor_name", condition = LIKE)
    @Excel(name = "主办")
    private String sponsorName;

    /**
     * 承办
     */
    @ApiModelProperty(value = "承办")
    @Size(max = 255, message = "承办长度不能超过255")
    @TableField(value = "undertaker_name", condition = LIKE)
    @Excel(name = "承办")
    private String undertakerName;

    /**
     * 预定面积
     */
    @ApiModelProperty(value = "预定面积")
    @TableField(value = "reserve_area")
    @Excel(name = "预定面积")
    private Integer reserveArea;

    /**
     * 预期人数
     */
    @ApiModelProperty(value = "预期人数")
    @TableField(value = "expect_viewer")
    @Excel(name = "预期人数")
    private Integer expectViewer;

    /**
     * logo地址
     */
    @ApiModelProperty(value = "logo地址")
    @Size(max = 255, message = "logo地址长度不能超过255")
    @TableField(value = "logo_url", condition = LIKE)
    @Excel(name = "logo地址")
    private String logoUrl;

    /**
     * 展会介绍
     */
    @ApiModelProperty(value = "展会介绍")
    @Size(max = 512, message = "展会介绍长度不能超过512")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "展会介绍")
    private String remark;

    /**
     * 官网地址
     */
    @ApiModelProperty(value = "官网地址")
    @Size(max = 255, message = "官网地址长度不能超过255")
    @TableField(value = "exhibition_website", condition = LIKE)
    @Excel(name = "官网地址")
    private String exhibitionWebsite;

    /**
     * 展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}
     */
    @ApiModelProperty(value = "展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}")
    @TableField(value = "state")
    @Excel(name = "展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}", replace = {"无状态_STATE_ONE", "销售商机_STATE_TWO", "报价确认_STATE_THREE", "活动确认_STATE_FOUR", "创立合同_STATE_FIVE", "合同付款_STATE_SIX", "活动结算_STATE_SEVEN", "活动结束_STATE_EIGHT", "其他状态_STATE_NINE",  "_null"})
    private ExhibitionStateEnum state;

    /**
     * 展会编号
     */
    @ApiModelProperty(value = "展会编号")
    @Size(max = 64, message = "展会编号长度不能超过64")
    @TableField(value = "exhibition_no", condition = LIKE)
    @Excel(name = "展会编号")
    private String exhibitionNo;

    /**
     * 所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}
     */
    @ApiModelProperty(value = "所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}")
    @TableField(value = "industry")
    @Excel(name = "所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}", replace = {"农林渔牧_INDUSTRY_ONE", "工业智造_INDUSTRY_TWO", "新兴产业_INDUSTRY_THREE", "美好生活_INDUSTRY_FOUR", "其他_OTHER",  "_null"})
    private ExhibitionIndustryEnum industry;

    /**
     * 同步状态：1已同步；0未同步
     */
    @ApiModelProperty(value = "同步状态：1已同步；0未同步")
    @TableField(value = "sync_state")
    @Excel(name = "同步状态：1已同步；0未同步")
    private Integer syncState;

    /**
     * 展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}
     */
    @ApiModelProperty(value = "展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}")
    @TableField(value = "exhibition_main_type")
    @Excel(name = "展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}", replace = {"自办展_SELF_EXHIBITION", "客展_GUEST_EXHIBITION",  "_null"})
    private ExhibitionExhibitionMainTypeEnum exhibitionMainType;


    @Builder
    public Exhibition(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    Long belongTo, String belongToName, Long orgCode, String exhibitionName, String externalExhibitionCode, Long customerId, 
                    String customerName, Long cutomerContactsId, String cutomerContactsName, Long businessOpportunityId, Long quotationId, LocalDateTime exhibitionStartTime, 
                    LocalDateTime exhibitionEndTime, LocalDateTime arrangementStartTime, LocalDateTime arrangementEndTime, LocalDateTime dismantlingStartTime, LocalDateTime dismantlingEndTime, ExhibitionExhibitionNatureEnum exhibitionNature, 
                    ExhibitionExhibitionTypeEnum exhibitionType, String exhibitionShortName, String exhibitionEnName, String exhibitionEnShortName, String sponsorName, String undertakerName, 
                    Integer reserveArea, Integer expectViewer, String logoUrl, String remark, String exhibitionWebsite, ExhibitionStateEnum state, 
                    String exhibitionNo, ExhibitionIndustryEnum industry, Integer syncState, ExhibitionExhibitionMainTypeEnum exhibitionMainType) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.belongTo = belongTo;
        this.belongToName = belongToName;
        this.orgCode = orgCode;
        this.exhibitionName = exhibitionName;
        this.externalExhibitionCode = externalExhibitionCode;
        this.customerId = customerId;
        this.customerName = customerName;
        this.cutomerContactsId = cutomerContactsId;
        this.cutomerContactsName = cutomerContactsName;
        this.businessOpportunityId = businessOpportunityId;
        this.quotationId = quotationId;
        this.exhibitionStartTime = exhibitionStartTime;
        this.exhibitionEndTime = exhibitionEndTime;
        this.arrangementStartTime = arrangementStartTime;
        this.arrangementEndTime = arrangementEndTime;
        this.dismantlingStartTime = dismantlingStartTime;
        this.dismantlingEndTime = dismantlingEndTime;
        this.exhibitionNature = exhibitionNature;
        this.exhibitionType = exhibitionType;
        this.exhibitionShortName = exhibitionShortName;
        this.exhibitionEnName = exhibitionEnName;
        this.exhibitionEnShortName = exhibitionEnShortName;
        this.sponsorName = sponsorName;
        this.undertakerName = undertakerName;
        this.reserveArea = reserveArea;
        this.expectViewer = expectViewer;
        this.logoUrl = logoUrl;
        this.remark = remark;
        this.exhibitionWebsite = exhibitionWebsite;
        this.state = state;
        this.exhibitionNo = exhibitionNo;
        this.industry = industry;
        this.syncState = syncState;
        this.exhibitionMainType = exhibitionMainType;
    }

}
